package com.swlz.service;

import java.util.List;

import com.swlz.entity.MallProduct;
import com.swlz.entity.MallType;
import com.swlz.entity.Role;
import com.swlz.exception.CodeException;
import com.swlz.vo.PageVO;

/**
 * <pre>
 * 业务逻辑接口
 * 商城产品类别
 * ClassName : com.swlz.service.MallTypeService
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020-06-27 21:19:44
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. It is forbidden to divulge it or use it for other commercial purposes
 * </pre>
 **/
public interface MallTypeService {


	/**
	 * 添加一个新的商城产品类别
	 * @param mallType
	 * @return
	 * @throws CodeException 500:添加商城产品类别错误
	 */
	int add(MallType mallType)throws CodeException;
	
	/**
	 * 根据产品类别编号修改商城产品类别
	 * @param mallType
	 * @return
	 * @throws CodeException 501:修改商城产品类别错误
	 */
	int update(MallType mallType)throws CodeException;
	
	
	/**
	 * 根据产品类别编号删除商城产品类别
	 * @param mallTypeId - 产品类别编号
	 * @return
	 * @throws CodeException 502:删除商城产品类别错误
	 */
	int delete(Long mallTypeId)throws CodeException;
	
	/**
	 * 根据产品类别编号获取商城产品类别对象
	 * @param mallTypeId - 产品类别编号
	 * @return
	 * @throws CodeException 503:获取商城产品类别失败
	 */
	MallType get(Long mallTypeId)throws CodeException;
	
	/**
	 * 根据模型查找匹配的数据，并进行分页
	 * @param mallType - 匹配数据模型
	 * @param current - 当前页面
	 * @param rowMax - 每页最大值
	 * @return - 分页结果
	 * @throws CodeException 504:获取商城产品类别分页数据失败
	 */
	PageVO<MallType> page(MallType mallType,Integer current,Integer rowMax)throws CodeException;

	List<MallType> list();
	List<MallType> list(MallType mallType,Integer index,Integer len)throws CodeException;
 
}
